<#import "../baseftl/page.ftl" as comm />
<#assign security=JspTaglibs["http://www.springframework.org/security/tags"] /> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script language="javascript" src="${base}/scripts/date-picker/WdatePicker.js"  type="text/javascript" ></script>
<style type="text/css" rel="stylesheet">
    form {
    margin: 0;
    }
    .editor {
    margin-top: 5px;
    margin-bottom: 5px;
    }
  </style>
  <script type="text/javascript" charset="utf-8" src="${base}/scripts/kindeditor/kindeditor.js"></script>
  <script type="text/javascript">
    KE.show({
        id : 'content1',
        cssPath : './index.css'
    });
  </script>
<title>添加文章</title>
</head>

<body>
<div>
<br />
<form name="example" method="post" action="${base}/article/articleitem/save.shtml">
<input type="hidden" name="articleItem.id" value="${articleItem.id?default('')}" />
<input type="hidden" name="articleItem.version" value="${articleItem.version?default('')}" />
<input type="hidden" name="articleItem.author" value="<@security.authentication	property="name" />" />
  <table width="99%" border="0" align="center"  cellpadding="3" cellspacing="1">
    <tr>
      <td align="left">标题*</td>
      <td ><input name="articleItem.title" type="text" size="68" style="border:1px dashed  #b60000; height:22px; " value="${articleItem.title?default('')}"/>&nbsp;</td>
    </tr>
    <tr>
      <td align="left">发布日期*</td>
      <td>		<input readonly  style="border:1px dashed  #b60000; height:22px; " name="articleItem.updateDate" id="dateline" type="text" value="${articleItem.insertDate?string('yyyy-MM-dd')}" min="3" max="50" onFocus="new WdatePicker(this,'%Y-%M-%D',false)"/> <img src="${base}/images/leaf.jpg" height="35"/></td>
    </tr>
    <tr>
      <td align="left" bgcolor="#F7F1F1" >文章分类*<br />
      </td>
      <td>
       <@s.select name="article.id" list=listArticle  listKey="id" listValue="articletype" value="articleItem.article.id" />
        </td>
    </tr>
    <tr>
      <td align="left">文章编辑  <br />文章内容</td>
      <td>
    <div class="editor">
      <textarea id="content1" name="articleItem.content" style="width:600px;height:400px;visibility:hidden;">
${articleItem.content?default('')?html}
</textarea>
   
    <input type="button" name="button" value="取得内容" onclick="javascript:alert(KE.util.getData('content1'));" />
    <input type="button" name="button" value="取得纯文本" onclick="javascript:alert(KE.util.getPureData('content1'));" />
    <input type="submit" name="button" value="提交内容" />
 </div>
      </td>
    </tr>
    
  </table>
    </form>
</div>
</body>
</html>
